home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Applications 1999 May / SGI IRIX 6.5 Applications 1999 May.iso / dist / nss_fasttrack.idb / var / netscape / fasttrack / httpd-%%HOSTNAME%% / stop.z / stop
Text File  |  1998-10-13  |  426b  |  26 lines

  1. #!/bin/sh
  2.  
  3. PID_FILE=/var/netscape/fasttrack/httpd-%%HOSTNAME%%/logs/pid
  4. if test -f $PID_FILE ; then
  5.     kill `cat $PID_FILE`
  6.     if test $? -ne 0 ; then
  7.         exit 1
  8.     fi
  9. else
  10.     echo server not running
  11.     exit 1
  12. fi
  13.  
  14. loop_counter=1
  15. max_count=30
  16. while test $loop_counter -le $max_count; do
  17.     loop_counter=`expr $loop_counter + 1`
  18.     if test -f $PID_FILE ; then
  19.         sleep 2
  20.     else
  21.         exit 0
  22.     fi
  23. done
  24. echo server not responding to exit command
  25. exit 1
  26.